package com.javaweb.annotation.validate.impl;

import com.javaweb.constant.PatternConstant;
import com.javaweb.util.core.StringUtil;

/**
 * 邮箱校验
 * @author tank2140896
 */
public class EmailCheck {
	
	/**
	 * 邮箱校验方法
	 * @param email 邮箱
	 * @return boolean true：校验成功；false：校验失败
	 */
    public static boolean check(String email){
    	if(StringUtil.isEmpty(email)){
    		return false;
    	}
    	return PatternConstant.EMAIL_PATTERN.matcher(email).matches();
    }

}
